package com.example.wxy.bbtapp.Service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import com.example.wxy.bbtapp.Startup.AppSettings;

/**
 * Created by yons on 2017/9/8.
 */

public class BBTService  extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {

        Log.i(AppSettings.DebugTag, "BBTService onCreate");
        ServiceBus s = new ServiceBus();

        s.start(getApplicationContext());
    }

    @Override
    public void onDestroy() {
        //Toast.makeText(this, "BBTService Stoped", Toast.LENGTH_LONG).show();
        Log.i(AppSettings.DebugTag, " BBTService onDestroy");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.d(AppSettings.DebugTag, "onStartCommand() executed");
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onStart(Intent intent, int startid) {
        //Toast.makeText(this, "BBTService Start", Toast.LENGTH_LONG).show();
        Log.i(AppSettings.DebugTag, "BBTService onStart");

    }

}
